home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_6CE6B26933404CC59ACF078CF4CED8EC
< prev
next >
Wrap
Text File
|
2005-02-13
|
614b
|
30 lines
//wake in water particle shader
//should be used with prtWake2.vsh
//Luke Lenhart
//(C)2004-2005 Digipen Institute of Technology
//time since whenever
float time;
//
struct PS_INPUT
{
float2 Side : TEXCOORD0; //side of particle model is on (-1 to 1) (.xy)
float4 Clr : COLOR;
};
float4 PShader(PS_INPUT In) : COLOR
{
//calc wave alpha
float alpha=sin(In.Side.x*23+time) + sin(In.Side.y*11+sin(In.Side.x*13+time))*.5f;
//fade towards edges
alpha*=sqrt(saturate(1.0f-distance(float2(0,0),In.Side.xy)));
//make final color
float4 clr=In.Clr;
clr.a*=alpha;
return clr;
}